from configparser import ConfigParser
import os
import yaml


yaml_path = os.path.dirname(os.path.dirname(__file__))
yaml_data = os.path.join(yaml_path,'config_data','data.yaml')
class ReadFlie:

    def load_ini(self, file_path):
        config = ConfigParser()
        config.read(file_path, encoding="UTF-8")
        data = config._sections
        print(data)
        return data

    def load_yaml(self,filepath):
        with open(filepath,encoding='utf-8') as f:
            data = yaml.load(stream=f,Loader=yaml.FullLoader)
            print(data)
            return data
r = ReadFlie()
if __name__ == '__main__':
    r.load_yaml(yaml_data)







